#include "../../inc/skyFont.h"

#ifdef _SYMBIAN
#include <e32std.h>
#include <e32base.h>
#include <f32file.h>
#include <eikenv.h>
#include <hal_data.h>
#include <CHARCONV.H>
#include <gdi.h>
#include "../../inc/skyString.h"
namespace Sky
{

	Bool FontManager::createFont(String* fontName,i32 weight,i32 height,i32 width,Font* font)
	{
		TPtrC	ptr(fontName->toCharString());
		TFontSpec itemFontSpec(ptr, weight );	
		itemFontSpec.iFontStyle = TFontStyle(EPostureUpright,EStrokeWeightBold,EPrintPosNormal);
		CGraphicsDevice* screenDevice = CEikonEnv::Static()->ScreenDevice();
		screenDevice->GetNearestFontInTwips(font->_font,itemFontSpec);
		return vTrue;
	}

	OSFont::~OSFont()
	{
		if ( _font )
		{
			CGraphicsDevice* screenDevice = CEikonEnv::Static()->ScreenDevice();
			screenDevice->ReleaseFont(_font);
		}
	}

}
#endif //_SYMBIAN

